Integrand size = 14, antiderivative size = 36 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {3 b x}{8}-\frac {3}{8} b \cos (x) \sin (x)-\frac {1}{4} b \cos (x) \sin ^3(x)+\frac {1}{4} a \sin ^4(x) \]
[Out]
Time = 0.05 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.357, Rules used = {3168, 2644, 30, 2715, 8} \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {1}{4} a \sin ^4(x)+\frac {3 b x}{8}-\frac {1}{4} b \sin ^3(x) \cos (x)-\frac {3}{8} b \sin (x) \cos (x) \]
[In]
[Out]
Rule 8
Rule 30
Rule 2644
Rule 2715
Rule 3168
Rubi steps \begin{align*} \text {integral}& = \int \left (a \cos (x) \sin ^3(x)+b \sin ^4(x)\right ) \, dx \\ & = a \int \cos (x) \sin ^3(x) \, dx+b \int \sin ^4(x) \, dx \\ & = -\frac {1}{4} b \cos (x) \sin ^3(x)+a \text {Subst}\left (\int x^3 \, dx,x,\sin (x)\right )+\frac {1}{4} (3 b) \int \sin ^2(x) \, dx \\ & = -\frac {3}{8} b \cos (x) \sin (x)-\frac {1}{4} b \cos (x) \sin ^3(x)+\frac {1}{4} a \sin ^4(x)+\frac {1}{8} (3 b) \int 1 \, dx \\ & = \frac {3 b x}{8}-\frac {3}{8} b \cos (x) \sin (x)-\frac {1}{4} b \cos (x) \sin ^3(x)+\frac {1}{4} a \sin ^4(x) \\ \end{align*}
Time = 0.04 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.94 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {3 b x}{8}+\frac {1}{4} a \sin ^4(x)-\frac {1}{4} b \sin (2 x)+\frac {1}{32} b \sin (4 x) \]
[In]
[Out]
Time = 0.42 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.78
method | result | size |
default | \(b \left (-\frac {\left (\sin \left (x \right )^{3}+\frac {3 \sin \left (x \right )}{2}\right ) \cos \left (x \right )}{4}+\frac {3 x}{8}\right )+\frac {a \sin \left (x \right )^{4}}{4}\) | \(28\) |
parts | \(b \left (-\frac {\left (\sin \left (x \right )^{3}+\frac {3 \sin \left (x \right )}{2}\right ) \cos \left (x \right )}{4}+\frac {3 x}{8}\right )+\frac {a \sin \left (x \right )^{4}}{4}\) | \(28\) |
risch | \(\frac {3 x b}{8}+\frac {a \cos \left (4 x \right )}{32}+\frac {b \sin \left (4 x \right )}{32}-\frac {a \cos \left (2 x \right )}{8}-\frac {b \sin \left (2 x \right )}{4}\) | \(34\) |
parallelrisch | \(\frac {3 x b}{8}+\frac {3 a}{32}-\frac {a \cos \left (2 x \right )}{8}+\frac {a \cos \left (4 x \right )}{32}+\frac {b \sin \left (4 x \right )}{32}-\frac {b \sin \left (2 x \right )}{4}\) | \(37\) |
norman | \(\frac {4 a \tan \left (\frac {x}{2}\right )^{4}-\frac {3 b \tan \left (\frac {x}{2}\right )}{4}-\frac {11 b \tan \left (\frac {x}{2}\right )^{3}}{4}+\frac {11 b \tan \left (\frac {x}{2}\right )^{5}}{4}+\frac {3 b \tan \left (\frac {x}{2}\right )^{7}}{4}+\frac {3 x b}{8}+\frac {3 x b \tan \left (\frac {x}{2}\right )^{2}}{2}+\frac {9 x b \tan \left (\frac {x}{2}\right )^{4}}{4}+\frac {3 x b \tan \left (\frac {x}{2}\right )^{6}}{2}+\frac {3 x b \tan \left (\frac {x}{2}\right )^{8}}{8}}{\left (1+\tan \left (\frac {x}{2}\right )^{2}\right )^{4}}\) | \(100\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.00 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {1}{4} \, a \cos \left (x\right )^{4} - \frac {1}{2} \, a \cos \left (x\right )^{2} + \frac {3}{8} \, b x + \frac {1}{8} \, {\left (2 \, b \cos \left (x\right )^{3} - 5 \, b \cos \left (x\right )\right )} \sin \left (x\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 75 vs. \(2 (37) = 74\).
Time = 0.15 (sec) , antiderivative size = 75, normalized size of antiderivative = 2.08 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {a \sin ^{4}{\left (x \right )}}{4} + \frac {3 b x \sin ^{4}{\left (x \right )}}{8} + \frac {3 b x \sin ^{2}{\left (x \right )} \cos ^{2}{\left (x \right )}}{4} + \frac {3 b x \cos ^{4}{\left (x \right )}}{8} - \frac {5 b \sin ^{3}{\left (x \right )} \cos {\left (x \right )}}{8} - \frac {3 b \sin {\left (x \right )} \cos ^{3}{\left (x \right )}}{8} \]
[In]
[Out]
none
Time = 0.22 (sec) , antiderivative size = 25, normalized size of antiderivative = 0.69 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {1}{4} \, a \sin \left (x\right )^{4} + \frac {1}{32} \, b {\left (12 \, x + \sin \left (4 \, x\right ) - 8 \, \sin \left (2 \, x\right )\right )} \]
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.92 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {3}{8} \, b x + \frac {1}{32} \, a \cos \left (4 \, x\right ) - \frac {1}{8} \, a \cos \left (2 \, x\right ) + \frac {1}{32} \, b \sin \left (4 \, x\right ) - \frac {1}{4} \, b \sin \left (2 \, x\right ) \]
[In]
[Out]
Time = 21.22 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.97 \[ \int \sin ^3(x) (a \cos (x)+b \sin (x)) \, dx=\frac {a\,{\cos \left (x\right )}^4}{4}+\frac {b\,\sin \left (x\right )\,{\cos \left (x\right )}^3}{4}-\frac {a\,{\cos \left (x\right )}^2}{2}-\frac {5\,b\,\sin \left (x\right )\,\cos \left (x\right )}{8}+\frac {3\,b\,x}{8} \]
[In]
[Out]